<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    function student(name, id, sex, sayHi) {
        this.cName = name;
        this.cId = id;
        this.Csex = sex;
        this.csex = sayHi;
        this.info = function () {
            console.log('你好我是xxx');
        }
    }
    var ming = new student('你好我是xxx')
    ming.info()
</script>

</html>